package scau.cxq.homework.controller;

import com.alibaba.fastjson.JSON;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import scau.cxq.homework.dto.LogExecuteDto;
import scau.cxq.homework.service.CaixiaoqingResultService;

@RestController
public class CaixiaoqingResultController {

    @Autowired
    private CaixiaoqingResultService caixiaoqingResultService;

    @GetMapping("/findAll")
    public Object findAll () {
        return caixiaoqingResultService.selectAllCaixiaoqingResult();
    }

    @GetMapping ("/execute")
    public String execute () {
        return JSON.toJSONString(caixiaoqingResultService.getLogExecuteDto());
    }
}
